package com.sinosoft.ebusiness.domain.elementManage;
// 采用工具 Hibernate Tools 3.2.4.GA (sinosoft version) 生成，请勿手工修改。

import java.util.ArrayList;
import java.util.List;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.OrderBy;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.sinosoft.ebusiness.domain.elementManage.GePageViewgroup;
import com.sinosoft.ebusiness.domain.elementManage.GeProductStepTemplate;
import com.sinosoft.ebusiness.domain.elementManage.GeProductStepViewitem;
import com.sinosoft.ebusiness.domain.elementManage.GeProductTemplateViewgroupId;

/**
 * POJO类GeProductTemplateViewgroup
 */
@Entity
@Table(name = "GE_PRODUCT_TEMPLATE_VIEWGROUP")
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class GeProductTemplateViewgroup implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1154111537021687308L;

	/** 属性ID */
	private GeProductTemplateViewgroupId id;

	/** 属性gePageViewgroup */
	private GePageViewgroup gePageViewgroup;
	
	private GeProductStepTemplate geProductStepTemplate;

	/** 属性isshowview */
	private String isshowview;

	/** 属性显示顺序序号 */
	private Long orderNo;

	/** 属性more */
	private Long more;
	
	/**属性方法体*/
	
	private String funBody;

	/** 属性geProductStepViewitems */
	private List<GeProductStepViewitem> geProductStepViewitems = new ArrayList<GeProductStepViewitem>(
			0);

	/**
	 * 类GeProductTemplateViewgroup的默认构造方法
	 */
	public GeProductTemplateViewgroup() {
	}

	/**
	 * 属性ID的getter方法
	 */
	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "groupcode", column = @Column(name = "GROUPCODE")),
			@AttributeOverride(name = "processcode", column = @Column(name = "PROCESSCODE")),
			@AttributeOverride(name = "productcode", column = @Column(name = "PRODUCTCODE")),
			@AttributeOverride(name = "version", column = @Column(name = "VERSION")) })
	public GeProductTemplateViewgroupId getId() {
		return this.id;
	}

	/**
	 * 属性ID的setter方法
	 */
	public void setId(GeProductTemplateViewgroupId id) {
		this.id = id;
	}

	/**
	 * 属性gePageViewgroup的getter方法
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GROUPCODE", nullable = false, insertable = false, updatable = false)
	@JSONField(serialize=false)
	@JsonIgnore
	@JsonBackReference
	public GePageViewgroup getGePageViewgroup() {
		return this.gePageViewgroup;
	}

	/**
	 * 属性gePageViewgroup的setter方法
	 */
	public void setGePageViewgroup(GePageViewgroup gePageViewgroup) {
		this.gePageViewgroup = gePageViewgroup;
	}

	/**
	 * 属性isshowview的getter方法
	 */

	@Column(name = "ISSHOWVIEW")
	public String getIsshowview() {
		return this.isshowview;
	}

	/**
	 * 属性isshowview的setter方法
	 */
	public void setIsshowview(String isshowview) {
		this.isshowview = isshowview;
	}

	/**
	 * 属性显示顺序序号的getter方法
	 */

	@Column(name = "ORDERNO")
	public Long getOrderNo() {
		return this.orderNo;
	}

	/**
	 * 属性显示顺序序号的setter方法
	 */
	public void setOrderNo(Long orderNo) {
		this.orderNo = orderNo;
	}

	/**
	 * 属性more的getter方法
	 */

	@Column(name = "MORE")
	public Long getMore() {
		return this.more;
	}

	/**
	 * 属性more的setter方法
	 */
	public void setMore(Long more) {
		this.more = more;
	}

	/**
	 * 属性geProductStepViewitems的getter方法
	 */
	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "geProductTemplateViewgroup")
	@OrderBy(clause="orderNo")
	public List<GeProductStepViewitem> getGeProductStepViewitems() {
		return this.geProductStepViewitems;
	}

	/**
	 * 属性geProductStepViewitems的setter方法
	 */
	public void setGeProductStepViewitems(
			List<GeProductStepViewitem> geProductStepViewitems) {
		this.geProductStepViewitems = geProductStepViewitems;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns({
			@JoinColumn(name = "PROCESSCODE", referencedColumnName = "PROCESSCODE", insertable = false, updatable = false),
			@JoinColumn(name = "PRODUCTCODE", referencedColumnName = "PRODUCTCODE", insertable = false, updatable = false),
			@JoinColumn(name = "VERSION", referencedColumnName = "VERSION", insertable = false, updatable = false) })
	@JsonBackReference
	public GeProductStepTemplate getGeProductStepTemplate() {
		return geProductStepTemplate;
	}

	public void setGeProductStepTemplate(GeProductStepTemplate geProductStepTemplate) {
		this.geProductStepTemplate = geProductStepTemplate;
	}
	
	@Column(name = "FUNBODY")
	public String getFunBody() {
		return funBody;
	}

	public void setFunBody(String funBody) {
		this.funBody = funBody;
	}
	

}
